<!doctype html>
<html lang="<%= I18n.locale %>">
  <head>
    <%= render 'spree/shared/head' %>
    <%= render 'spree/shared/custom_head' %>
    <%= current_store.storefront_custom_code_head&.html_safe %>
  </head>
  <body class="bg-background w-full text-text">
    <%= render_storefront_partials(:body_start_partials) %>
    <%= current_store.storefront_custom_code_body_start&.html_safe %>

    <%= turbo_frame_tag(:flash) do %>
      <%= render 'spree/shared/flashes' %>
    <% end unless page_builder_enabled? %>
    <%= yield %>
    <style>
      .page-contents {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        justify-content: space-between;
      }
    </style>

    <%= current_store.storefront_custom_code_body_end&.html_safe %>
    <%= render_storefront_partials(:body_end_partials) %>
  </body>
</html>

<% unless Rails.env.test? %>
  <template id="csrf_meta_tags">
    <%= csrf_meta_tags %>
  </template>
<% end %>
